A content addressable memory (CAM) compares a search word (e.g., in multiple bits) against stored data, and returns the address of matching word in the stored data. The address of the matching word may be returned when every single bit of the search word finds its match in the stored data. A ternary CAM allows a third matching state of “X” or “Don't Care” for one or more bits in the stored word, thus adding flexibility to the search. For example, a ternary CAM might have a stored word of “10XX0” which would match any of the four search words “10000”, “10010”, “10100”, or “10110”.
FIG. 1A illustrates a TCAM 100 with a hierarchical match line structure. In FIG. 1A, the TCAM 100 comprises multiple columns of TCAM cells 102. The TCAM 100 comprises local match lines (LMLs) 104, a global match line (GML) 106, and local to global match line converters 108. As illustrated in FIG. 1A, the hierarchical match line architecture comprises match lines in two layers, where a local match line is connected to the global match line for every two columns of TCAM cells (e.g., 16 TCAM cells) as depicted in a TCAM sector 150.
FIG. 1B is an exploded view of the TCAM sector 150. In FIG. 1B, a local to global match line converter 152 comprises 5 transistors (e.g., P1, P2, P3, P4, and N1). Gates of transistors P1 and P2 at node 1 154 as well as the gate of transistor N1 at node 2 156 are precharged. In the case of a “miss” during a search operation, where corresponding search bits of a search string are compared with stored bits in 8 TCAM cells 158 and 8 TCAM cells 160, a LML 162 or a LML 164 goes to “low,” thus pulling the GML 106 to “high.” However, in the case of “match,” both the LML 162 and the LML 164 go “high,” thus pulling down the GML 106 to “low.” Accordingly, the “miss” case may consume more power for the TCAM 100 than the “match case.” Additionally, as the TCAM 100 has a “high” probability of the “miss” case than the “match” case, the TCAM 100 may consume large power in every search cycle as the GML 106 is maintained in the “high” state for the most of time.